using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._TINDataset
{
    /// <summary>
    /// <para>Create TIN</para>
    /// <para>Creates a triangulated irregular network (TIN) dataset.</para>
    /// <para>创建三角不规则网络 （TIN） 数据集。</para>
    /// </summary>    
    [DisplayName("Create TIN")]
    public class CreateTin : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateTin()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_tin">
        /// <para>Output TIN</para>
        /// <para>The TIN dataset that will be generated.</para>
        /// <para>将生成的 TIN 数据集。</para>
        /// </param>
        public CreateTin(object _out_tin)
        {
            this._out_tin = _out_tin;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Create TIN";

        public override string CallName => "3d.CreateTin";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem", "tinSaveVersion", "workspace"];

        public override object[] ParameterInfo => [_out_tin, _spatial_reference, _in_features, _constrained_delaunay.GetGPValue()];

        /// <summary>
        /// <para>Output TIN</para>
        /// <para>The TIN dataset that will be generated.</para>
        /// <para>将生成的 TIN 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output TIN")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_tin { get; set; }


        /// <summary>
        /// <para>Coordinate System</para>
        /// <para>The spatial reference of the output TIN should be set to a projected coordinate system. Geographic coordinate systems are not recommended because Delaunay triangulation cannot be guaranteed when the XY coordinates are expressed in angular units, which could have an adverse impact on the accuracy of distance-based calculations, such as slope, volume, and line of sight.</para>
        /// <para>输出 TIN 的空间参考应设置为投影坐标系。不建议使用地理坐标系，因为当 XY 坐标以角度单位表示时，无法保证 Delaunay 三角测量，这可能会对基于距离的计算（如坡度、体积和视线）的准确性产生不利影响。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Coordinate System")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _spatial_reference { get; set; } = null;


        /// <summary>
        /// <para>Input Feature Class</para>
        /// <para><xdoc>
        ///   <para>The input features and their related properties that will contribute to the definition of the TIN.</para>
        ///   <bulletList>
        ///     <bullet_item>Input Features—The feature with the geometry that will be imported to the TIN.</bullet_item><para/>
        ///     <bullet_item>Height Field— The source of elevation for the input features. Any numeric field from the input feature's attribute table can be used, along with Shape.Z for the Z values of 3D features, and Shape.M for the M values stored in the geometry. Choosing the <None> keyword will result in the feature's elevation being interpolated from the surrounding surface.</bullet_item><para/>
        ///     <bullet_item>Type—The feature's role in shaping the TIN surface will be defined. See the tool's usage tips for more information about surface feature types.</bullet_item><para/>
        ///     <bullet_item>Tag Field—A numeric attribute will be assigned to the TIN's data elements using values obtained from an integer field in the input feature's attribute table.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>有助于定义 TIN 的输入特征及其相关属性。</para>
        ///   <bulletList>
        ///     <bullet_item>输入要素 （Input Features） - 具有将输入到 TIN 的几何的特征。</bullet_item><para/>
        /// <bullet_item>高度字段- 输入要素的高程源。可以使用输入要素属性表中的任何数值字段，以及用于 3D 要素的 Z 值的 Shape.Z 和 用于几何中存储的 M 值的 Shape.M。选择<None>关键字将导致要素的高程从周围表面插值。</bullet_item><para/>
        ///     <bullet_item>类型 - 将定义特征在塑造 TIN 曲面中的作用。有关表面要素类型的详细信息，请参阅该工具的使用提示。</bullet_item><para/>
        ///     <bullet_item>标签字段 - 将使用从输入要素属性表中的整数字段获取的值，将数值属性分配给 TIN 的数据元素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_features { get; set; } = null;


        /// <summary>
        /// <para>Constrained Delaunay</para>
        /// <para><xdoc>
        ///   <para>Specifies the triangulation technique that will be used along the breaklines of the TIN.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The TIN will use Delaunay conforming triangulation, which may densify each segment of the breaklines to produce multiple triangle edges. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The TIN will use constrained Delaunay triangulation, which will add each segment as a single edge. Delaunay triangulation rules are honored everywhere except along breaklines, which will not be densified.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将沿 TIN 的断线使用的三角测量技术。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - TIN 将使用符合 Delaunay 的三角测量，这可能会使断线的每个段致密化以生成多个三角形边。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - TIN 将使用约束 Delaunay 三角剖分，这会将每个线段添加为一条边。除沿断线外，所有地方都遵守 Delaunay 三角测量规则，这些断线不会被致密化。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Constrained Delaunay")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _constrained_delaunay_value _constrained_delaunay { get; set; } = _constrained_delaunay_value._false;

        public enum _constrained_delaunay_value
        {
            /// <summary>
            /// <para>CONSTRAINED_DELAUNAY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CONSTRAINED_DELAUNAY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DELAUNAY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DELAUNAY")]
            [GPEnumValue("false")]
            _false,

        }

        public CreateTin SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object tinSaveVersion = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, tinSaveVersion: tinSaveVersion, workspace: workspace);
            return this;
        }

    }

}